﻿using System;
using System.Globalization;
using Avalonia.Data.Converters;
using Avalonia.Media;
using iOSClub.App.Share;

namespace iOSClub.App.Desktop.Converters;

public class TaskTimeConverter : IValueConverter
{
    public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
    {
        if (value is not TaskModel model) return value;
        return new SolidColorBrush(model.Status ? Colors.OrangeRed : Colors.LimeGreen);
    }

    public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
    {
        return value;
    }
}